import 'package:dio/dio.dart';
import 'dart:io';
import 'dart:async';
import 'api_url.dart';

Future getHomePageData() async {
  try {
    Response response;
    Dio dio = new Dio();
    dio.options.contentType = Headers.formUrlEncodedContentType;
    var formData = {'lon': '115.02932', 'lat': '35.76189'};
    response = await dio.post(path['home_page_url'], data: formData);
    print(response);
    if (response.statusCode == 200) {
      return response;
    }else{
      throw Exception ;
    }
  } catch (e) {
    return print("==========================$e");
  }
}
